package com.cskaoyan.mall.order.service;

import com.cskaoyan.mall.commons.result.ResponseData;
import com.cskaoyan.mall.commons.result.ResponseUtil;
import com.cskaoyan.mall.order.constant.OrderRetCode;
import com.cskaoyan.mall.order.dto.CreateOrderRequest;
import com.cskaoyan.mall.order.dto.CreateOrderResponse;
import com.cskaoyan.mall.order.dto.PageInfo;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface OrderCoreService {
    @PostMapping("/shopping/order")
    public CreateOrderResponse createOrder(CreateOrderRequest request) ;

    /**
     * 获取当前用户的所有订单
     * @param pageInfo
     */

    @GetMapping("/shopping/order")
    public ResponseData orderList(PageInfo pageInfo, HttpRequest httpRequest) ;
    /**
     * 查询订单明细
     * @param id
     * @return
     */
    @GetMapping("/shopping/order/{id}")
    public ResponseData orderDetail(@PathVariable(name = "id")String id) ;
    /**
     * 取消订单
     * @param id
     * @return
     */
    @GetMapping("/shopping/cancelOrder")
    public ResponseData cancelOrder(@RequestBody String id) ;
    /**
     * 删除订单
     * @param id
     * @return
     */
//    @GetMapping("/shopping/order/{id}")
//    public ResponseData deleteOrder(@PathVariable(name = "id")String id) ;

}
